.class public Lcom/android/inputmethod/latin/LatinKeyboardView;
.super Lcom/android/inputmethod/latin/KeyboardView;
.source "LatinKeyboardView.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/android/inputmethod/latin/LatinKeyboardView$ExtensionKeyboardListener;
    }
.end annotation


# static fields
.field static final DEBUG:Z = false

.field static final DEBUG_AUTO_PLAY:Z = false

.field static final DEBUG_LINE:Z = false

.field static final INVALID_POINTER_ID:I = -0x1

.field static final KEYCODE_NEXT_LANGUAGE:I = -0x68

.field static final KEYCODE_OPTIONS:I = -0x64

.field static final KEYCODE_PREV_LANGUAGE:I = -0x69

.field static final KEYCODE_SHIFT_LONGPRESS:I = -0x65

.field private static final MSG_TOUCH_DOWN:I = 0x1

.field private static final MSG_TOUCH_UP:I = 0x2

.field static final TAG:Ljava/lang/String; = "MTIP"


# instance fields
.field private isTempShift:Z

.field private mAsciiKeys:[Landroid/inputmethodservice/Keyboard$Key;

.field private mDisableDisambiguation:Z

.field private mDownDelivered:Z

.field mDownPid:I

.field private mDroppingEvents:Z

.field private mEnableMultiTouch:Z

.field private mExtension:Lcom/android/inputmethod/latin/LatinKeyboardView;

.field private mExtensionPopup:Landroid/widget/PopupWindow;

.field private mExtensionVisible:Z

.field private mFirstEvent:Z

.field mHandler2:Landroid/os/Handler;

.field private mHasShiftKey:Z

.field private mIsExtensionType:Z

.field private mJumpThresholdSquare:I

.field private mLastRowY:I

.field private mLastX:I

.field private mLastY:I

.field private mPaint:Landroid/graphics/Paint;

.field private mPhoneKeyboard:Landroid/inputmethodservice/Keyboard;

.field private mPlaying:Z

.field mShiftFreeze:Z

.field mShiftPid:I

.field private mStringIndex:I

.field private mStringToPlay:Ljava/lang/String;


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 3
    .parameter "context"
    .parameter "attrs"

    .prologue
    const/4 v2, 0x0

    const/4 v1, -0x1

    .line 80
    invoke-direct {p0, p1, p2}, Lcom/android/inputmethod/latin/KeyboardView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 66
    const v0, 0x7fffffff

    iput v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mJumpThresholdSquare:I

    .line 72
    iput v1, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    .line 73
    iput v1, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftPid:I

    .line 74
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->isTempShift:Z

    .line 296
    const/16 v0, 0x100

    new-array v0, v0, [Landroid/inputmethodservice/Keyboard$Key;

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mAsciiKeys:[Landroid/inputmethodservice/Keyboard$Key;

    .line 302
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mEnableMultiTouch:Z

    .line 467
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftFreeze:Z

    .line 81
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 3
    .parameter "context"
    .parameter "attrs"
    .parameter "defStyle"

    .prologue
    const/4 v2, 0x0

    const/4 v1, -0x1

    .line 84
    invoke-direct {p0, p1, p2, p3}, Lcom/android/inputmethod/latin/KeyboardView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 66
    const v0, 0x7fffffff

    iput v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mJumpThresholdSquare:I

    .line 72
    iput v1, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    .line 73
    iput v1, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftPid:I

    .line 74
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->isTempShift:Z

    .line 296
    const/16 v0, 0x100

    new-array v0, v0, [Landroid/inputmethodservice/Keyboard$Key;

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mAsciiKeys:[Landroid/inputmethodservice/Keyboard$Key;

    .line 302
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mEnableMultiTouch:Z

    .line 467
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftFreeze:Z

    .line 85
    return-void
.end method

.method private closeExtension()V
    .locals 2

    .prologue
    .line 248
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtension:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->closing()V

    .line 249
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtension:Lcom/android/inputmethod/latin/LatinKeyboardView;

    const/4 v1, 0x4

    invoke-virtual {v0, v1}, Lcom/android/inputmethod/latin/LatinKeyboardView;->setVisibility(I)V

    .line 250
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtensionVisible:Z

    .line 251
    return-void
.end method

.method private findKeys()V
    .locals 5

    .prologue
    .line 369
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getKeyboard()Landroid/inputmethodservice/Keyboard;

    move-result-object v3

    invoke-virtual {v3}, Landroid/inputmethodservice/Keyboard;->getKeys()Ljava/util/List;

    move-result-object v2

    .line 371
    .local v2, keys:Ljava/util/List;,"Ljava/util/List<Landroid/inputmethodservice/Keyboard$Key;>;"
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v3

    if-ge v1, v3, :cond_1

    .line 372
    invoke-interface {v2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Landroid/inputmethodservice/Keyboard$Key;

    iget-object v3, v3, Landroid/inputmethodservice/Keyboard$Key;->codes:[I

    const/4 v4, 0x0

    aget v0, v3, v4

    .line 373
    .local v0, code:I
    if-ltz v0, :cond_0

    const/16 v3, 0xff

    if-gt v0, v3, :cond_0

    .line 374
    iget-object v4, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mAsciiKeys:[Landroid/inputmethodservice/Keyboard$Key;

    invoke-interface {v2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Landroid/inputmethodservice/Keyboard$Key;

    aput-object v3, v4, v0

    .line 371
    :cond_0
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 377
    .end local v0           #code:I
    :cond_1
    return-void
.end method

.method private handleSuddenJump(Landroid/view/MotionEvent;)Z
    .locals 14
    .parameter "me"

    .prologue
    .line 128
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v8

    .line 129
    .local v8, action:I
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v0

    float-to-int v12, v0

    .line 130
    .local v12, x:I
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v0

    float-to-int v13, v0

    .line 131
    .local v13, y:I
    const/4 v10, 0x0

    .line 134
    .local v10, result:Z
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getPointerCount()I

    move-result v0

    const/4 v1, 0x1

    if-le v0, v1, :cond_0

    .line 135
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDisableDisambiguation:Z

    .line 137
    :cond_0
    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDisableDisambiguation:Z

    if-eqz v0, :cond_2

    .line 139
    const/4 v0, 0x1

    if-ne v8, v0, :cond_1

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDisableDisambiguation:Z

    .line 140
    :cond_1
    const/4 v0, 0x0

    .line 190
    :goto_0
    return v0

    .line 143
    :cond_2
    packed-switch v8, :pswitch_data_0

    .line 188
    :cond_3
    :goto_1
    iput v12, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mLastX:I

    .line 189
    iput v13, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mLastY:I

    move v0, v10

    .line 190
    goto :goto_0

    .line 146
    :pswitch_0
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDroppingEvents:Z

    .line 147
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDisableDisambiguation:Z

    goto :goto_1

    .line 151
    :pswitch_1
    iget v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mLastX:I

    sub-int/2addr v0, v12

    iget v1, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mLastX:I

    sub-int/2addr v1, v12

    mul-int/2addr v0, v1

    iget v1, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mLastY:I

    sub-int/2addr v1, v13

    iget v2, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mLastY:I

    sub-int/2addr v2, v13

    mul-int/2addr v1, v2

    add-int v9, v0, v1

    .line 155
    .local v9, distanceSquare:I
    iget v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mJumpThresholdSquare:I

    if-le v9, v0, :cond_6

    iget v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mLastY:I

    iget v1, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mLastRowY:I

    if-lt v0, v1, :cond_4

    iget v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mLastRowY:I

    if-ge v13, v0, :cond_6

    .line 158
    :cond_4
    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDroppingEvents:Z

    if-nez v0, :cond_5

    .line 159
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDroppingEvents:Z

    .line 161
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getEventTime()J

    move-result-wide v0

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getEventTime()J

    move-result-wide v2

    const/4 v4, 0x1

    iget v5, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mLastX:I

    int-to-float v5, v5

    iget v6, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mLastY:I

    int-to-float v6, v6

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getMetaState()I

    move-result v7

    invoke-static/range {v0 .. v7}, Landroid/view/MotionEvent;->obtain(JJIFFI)Landroid/view/MotionEvent;

    move-result-object v11

    .line 164
    .local v11, translated:Landroid/view/MotionEvent;
    invoke-super {p0, v11}, Lcom/android/inputmethod/latin/KeyboardView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    .line 165
    invoke-virtual {v11}, Landroid/view/MotionEvent;->recycle()V

    .line 167
    .end local v11           #translated:Landroid/view/MotionEvent;
    :cond_5
    const/4 v10, 0x1

    goto :goto_1

    .line 168
    :cond_6
    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDroppingEvents:Z

    if-eqz v0, :cond_3

    .line 170
    const/4 v10, 0x1

    goto :goto_1

    .line 174
    .end local v9           #distanceSquare:I
    :pswitch_2
    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDroppingEvents:Z

    if-eqz v0, :cond_3

    .line 177
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getEventTime()J

    move-result-wide v0

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getEventTime()J

    move-result-wide v2

    const/4 v4, 0x0

    int-to-float v5, v12

    int-to-float v6, v13

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getMetaState()I

    move-result v7

    invoke-static/range {v0 .. v7}, Landroid/view/MotionEvent;->obtain(JJIFFI)Landroid/view/MotionEvent;

    move-result-object v11

    .line 180
    .restart local v11       #translated:Landroid/view/MotionEvent;
    invoke-super {p0, v11}, Lcom/android/inputmethod/latin/KeyboardView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    .line 181
    invoke-virtual {v11}, Landroid/view/MotionEvent;->recycle()V

    .line 182
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDroppingEvents:Z

    goto :goto_1

    .line 143
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_2
        :pswitch_1
    .end packed-switch
.end method

.method private makePopupWindow()V
    .locals 8

    .prologue
    const/4 v5, 0x0

    const/4 v7, 0x1

    const/4 v6, 0x0

    .line 209
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtensionPopup:Landroid/widget/PopupWindow;

    if-nez v3, :cond_0

    .line 210
    const/4 v3, 0x2

    new-array v2, v3, [I

    .line 211
    .local v2, windowLocation:[I
    new-instance v3, Landroid/widget/PopupWindow;

    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getContext()Landroid/content/Context;

    move-result-object v4

    invoke-direct {v3, v4}, Landroid/widget/PopupWindow;-><init>(Landroid/content/Context;)V

    iput-object v3, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtensionPopup:Landroid/widget/PopupWindow;

    .line 212
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtensionPopup:Landroid/widget/PopupWindow;

    invoke-virtual {v3, v5}, Landroid/widget/PopupWindow;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 213
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getContext()Landroid/content/Context;

    move-result-object v3

    const-string v4, "layout_inflater"

    invoke-virtual {v3, v4}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/view/LayoutInflater;

    .line 215
    .local v1, li:Landroid/view/LayoutInflater;
    const v3, 0x7f030005

    invoke-virtual {v1, v3, v5}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v3

    check-cast v3, Lcom/android/inputmethod/latin/LatinKeyboardView;

    iput-object v3, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtension:Lcom/android/inputmethod/latin/LatinKeyboardView;

    .line 216
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtension:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-direct {v3, v7}, Lcom/android/inputmethod/latin/LatinKeyboardView;->setExtensionType(Z)V

    .line 217
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtension:Lcom/android/inputmethod/latin/LatinKeyboardView;

    new-instance v4, Lcom/android/inputmethod/latin/LatinKeyboardView$ExtensionKeyboardListener;

    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getOnKeyboardActionListener()Lcom/android/inputmethod/latin/KeyboardView$OnKeyboardActionListener;

    move-result-object v5

    invoke-direct {v4, v5}, Lcom/android/inputmethod/latin/LatinKeyboardView$ExtensionKeyboardListener;-><init>(Lcom/android/inputmethod/latin/KeyboardView$OnKeyboardActionListener;)V

    invoke-virtual {v3, v4}, Lcom/android/inputmethod/latin/LatinKeyboardView;->setOnKeyboardActionListener(Lcom/android/inputmethod/latin/KeyboardView$OnKeyboardActionListener;)V

    .line 219
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtension:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v3, p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->setPopupParent(Landroid/view/View;)V

    .line 220
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtension:Lcom/android/inputmethod/latin/LatinKeyboardView;

    aget v4, v2, v7

    neg-int v4, v4

    invoke-virtual {v3, v6, v4}, Lcom/android/inputmethod/latin/LatinKeyboardView;->setPopupOffset(II)V

    .line 222
    iget-object v4, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtension:Lcom/android/inputmethod/latin/LatinKeyboardView;

    new-instance v0, Lcom/android/inputmethod/latin/LatinKeyboard;

    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getContext()Landroid/content/Context;

    move-result-object v5

    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getKeyboard()Landroid/inputmethodservice/Keyboard;

    move-result-object v3

    check-cast v3, Lcom/android/inputmethod/latin/LatinKeyboard;

    invoke-virtual {v3}, Lcom/android/inputmethod/latin/LatinKeyboard;->getExtension()I

    move-result v3

    invoke-direct {v0, v5, v3}, Lcom/android/inputmethod/latin/LatinKeyboard;-><init>(Landroid/content/Context;I)V

    .local v0, keyboard:Landroid/inputmethodservice/Keyboard;
    invoke-virtual {v4, v0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->setKeyboard(Landroid/inputmethodservice/Keyboard;)V

    .line 224
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtensionPopup:Landroid/widget/PopupWindow;

    iget-object v4, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtension:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v3, v4}, Landroid/widget/PopupWindow;->setContentView(Landroid/view/View;)V

    .line 225
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtensionPopup:Landroid/widget/PopupWindow;

    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getWidth()I

    move-result v4

    invoke-virtual {v3, v4}, Landroid/widget/PopupWindow;->setWidth(I)V

    .line 226
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtensionPopup:Landroid/widget/PopupWindow;

    invoke-virtual {v0}, Landroid/inputmethodservice/Keyboard;->getHeight()I

    move-result v4

    invoke-virtual {v3, v4}, Landroid/widget/PopupWindow;->setHeight(I)V

    .line 227
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtensionPopup:Landroid/widget/PopupWindow;

    const/4 v4, -0x1

    invoke-virtual {v3, v4}, Landroid/widget/PopupWindow;->setAnimationStyle(I)V

    .line 228
    invoke-virtual {p0, v2}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getLocationInWindow([I)V

    .line 230
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtension:Lcom/android/inputmethod/latin/LatinKeyboardView;

    aget v4, v2, v7

    neg-int v4, v4

    const/16 v5, 0x1e

    sub-int/2addr v4, v5

    invoke-virtual {v3, v6, v4}, Lcom/android/inputmethod/latin/LatinKeyboardView;->setPopupOffset(II)V

    .line 231
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtensionPopup:Landroid/widget/PopupWindow;

    invoke-virtual {v0}, Landroid/inputmethodservice/Keyboard;->getHeight()I

    move-result v4

    neg-int v4, v4

    aget v5, v2, v7

    add-int/2addr v4, v5

    invoke-virtual {v3, p0, v6, v6, v4}, Landroid/widget/PopupWindow;->showAtLocation(Landroid/view/View;III)V

    .line 236
    .end local v0           #keyboard:Landroid/inputmethodservice/Keyboard;
    .end local v1           #li:Landroid/view/LayoutInflater;
    .end local v2           #windowLocation:[I
    :goto_0
    return-void

    .line 234
    :cond_0
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtension:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v3, v6}, Lcom/android/inputmethod/latin/LatinKeyboardView;->setVisibility(I)V

    goto :goto_0
.end method

.method private openExtension()Z
    .locals 3

    .prologue
    const/4 v2, 0x1

    const/4 v1, 0x0

    .line 199
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->isShown()Z

    move-result v0

    if-nez v0, :cond_0

    move v0, v1

    .line 205
    :goto_0
    return v0

    .line 202
    :cond_0
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getKeyboard()Landroid/inputmethodservice/Keyboard;

    move-result-object v0

    check-cast v0, Lcom/android/inputmethod/latin/LatinKeyboard;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LatinKeyboard;->getExtension()I

    move-result v0

    if-nez v0, :cond_1

    move v0, v1

    goto :goto_0

    .line 203
    :cond_1
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->makePopupWindow()V

    .line 204
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtensionVisible:Z

    move v0, v2

    .line 205
    goto :goto_0
.end method

.method private setExtensionType(Z)V
    .locals 0
    .parameter "isExtensionType"

    .prologue
    .line 194
    iput-boolean p1, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mIsExtensionType:Z

    .line 195
    return-void
.end method

.method private setKeyboardLocal(Landroid/inputmethodservice/Keyboard;)V
    .locals 1
    .parameter "k"

    .prologue
    .line 307
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mHasShiftKey:Z

    .line 366
    return-void
.end method


# virtual methods
.method checkShiftForTouchDown(Landroid/view/MotionEvent;I)V
    .locals 1
    .parameter "me"
    .parameter "id"

    .prologue
    .line 414
    invoke-virtual {p0, p1}, Lcom/android/inputmethod/latin/LatinKeyboardView;->isOnShiftKey(Landroid/view/MotionEvent;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 415
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->onShiftTouchDown()V

    .line 416
    iput p2, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftPid:I

    .line 418
    :cond_0
    return-void
.end method

.method checkShiftForTouchUp(Landroid/view/MotionEvent;IZ)V
    .locals 1
    .parameter "me"
    .parameter "id"
    .parameter "forceUp"

    .prologue
    .line 421
    iget v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftPid:I

    if-eq v0, p2, :cond_0

    if-eqz p3, :cond_1

    .line 422
    :cond_0
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->onShiftTouchUp()V

    .line 423
    const/4 v0, -0x1

    iput v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftPid:I

    .line 425
    :cond_1
    return-void
.end method

.method public closing()V
    .locals 1

    .prologue
    .line 240
    invoke-super {p0}, Lcom/android/inputmethod/latin/KeyboardView;->closing()V

    .line 241
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtensionPopup:Landroid/widget/PopupWindow;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtensionPopup:Landroid/widget/PopupWindow;

    invoke-virtual {v0}, Landroid/widget/PopupWindow;->isShowing()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 242
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtensionPopup:Landroid/widget/PopupWindow;

    invoke-virtual {v0}, Landroid/widget/PopupWindow;->dismiss()V

    .line 243
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mExtensionPopup:Landroid/widget/PopupWindow;

    .line 245
    :cond_0
    return-void
.end method

.method public draw(Landroid/graphics/Canvas;)V
    .locals 0
    .parameter "c"

    .prologue
    .line 391
    invoke-super {p0, p1}, Lcom/android/inputmethod/latin/KeyboardView;->draw(Landroid/graphics/Canvas;)V

    .line 410
    return-void
.end method

.method public enableMultiTouch(Z)V
    .locals 0
    .parameter "enable"

    .prologue
    .line 431
    iput-boolean p1, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mEnableMultiTouch:Z

    .line 432
    return-void
.end method

.method public hasShiftKey()V
    .locals 1

    .prologue
    .line 435
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mHasShiftKey:Z

    .line 436
    return-void
.end method

.method public isMTouchUpNeededForKey(Landroid/view/MotionEvent;)Z
    .locals 9
    .parameter "me"

    .prologue
    const/4 v8, 0x1

    const/4 v7, -0x1

    const/4 v6, 0x0

    .line 496
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v4

    float-to-int v4, v4

    iget v5, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mPaddingLeft:I

    sub-int v2, v4, v5

    .line 497
    .local v2, x:I
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v4

    float-to-int v4, v4

    iget v5, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mPaddingTop:I

    sub-int v3, v4, v5

    .line 499
    .local v3, y:I
    const/4 v4, 0x0

    invoke-virtual {p0, v2, v3, v4}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getKeyIndices(II[I)I

    move-result v1

    .line 501
    .local v1, ki:I
    if-eq v7, v1, :cond_0

    iget-object v4, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mKeys:[Landroid/inputmethodservice/Keyboard$Key;

    array-length v4, v4

    if-lt v1, v4, :cond_1

    :cond_0
    move v4, v6

    .line 530
    :goto_0
    return v4

    .line 505
    :cond_1
    iget-object v4, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mKeys:[Landroid/inputmethodservice/Keyboard$Key;

    aget-object v0, v4, v1

    .line 510
    .local v0, key:Landroid/inputmethodservice/Keyboard$Key;
    iget-object v4, v0, Landroid/inputmethodservice/Keyboard$Key;->codes:[I

    aget v4, v4, v6

    const/4 v5, -0x5

    if-eq v4, v5, :cond_2

    iget-object v4, v0, Landroid/inputmethodservice/Keyboard$Key;->codes:[I

    aget v4, v4, v6

    const/16 v5, 0xa

    if-eq v4, v5, :cond_2

    iget-object v4, v0, Landroid/inputmethodservice/Keyboard$Key;->codes:[I

    aget v4, v4, v6

    const/16 v5, 0x20

    if-ne v4, v5, :cond_3

    :cond_2
    move v4, v8

    .line 512
    goto :goto_0

    .line 518
    :cond_3
    iget-object v4, v0, Landroid/inputmethodservice/Keyboard$Key;->codes:[I

    aget v4, v4, v6

    if-ne v4, v7, :cond_4

    move v4, v6

    .line 519
    goto :goto_0

    .line 525
    :cond_4
    iget-object v4, v0, Landroid/inputmethodservice/Keyboard$Key;->label:Ljava/lang/CharSequence;

    if-eqz v4, :cond_5

    move v4, v8

    .line 526
    goto :goto_0

    :cond_5
    move v4, v6

    .line 530
    goto :goto_0
.end method

.method public isOnShiftKey(Landroid/view/MotionEvent;)Z
    .locals 9
    .parameter "me"

    .prologue
    const/4 v8, -0x1

    .line 443
    const/4 v2, 0x0

    .line 445
    .local v2, ret:Z
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v6

    float-to-int v6, v6

    iget v7, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mPaddingLeft:I

    sub-int v4, v6, v7

    .line 446
    .local v4, x:I
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v6

    float-to-int v6, v6

    iget v7, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mPaddingTop:I

    sub-int v5, v6, v7

    .line 448
    .local v5, y:I
    const/4 v6, 0x0

    invoke-virtual {p0, v4, v5, v6}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getKeyIndices(II[I)I

    move-result v1

    .line 450
    .local v1, ki:I
    if-eq v8, v1, :cond_0

    iget-object v6, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mKeys:[Landroid/inputmethodservice/Keyboard$Key;

    array-length v6, v6

    if-lt v1, v6, :cond_1

    :cond_0
    move v3, v2

    .line 464
    .end local v2           #ret:Z
    .local v3, ret:I
    :goto_0
    return v3

    .line 454
    .end local v3           #ret:I
    .restart local v2       #ret:Z
    :cond_1
    iget-object v6, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mKeys:[Landroid/inputmethodservice/Keyboard$Key;

    aget-object v0, v6, v1

    .line 459
    .local v0, key:Landroid/inputmethodservice/Keyboard$Key;
    iget-object v6, v0, Landroid/inputmethodservice/Keyboard$Key;->codes:[I

    const/4 v7, 0x0

    aget v6, v6, v7

    if-ne v6, v8, :cond_2

    .line 460
    iget-boolean v6, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mHasShiftKey:Z

    if-eqz v6, :cond_2

    .line 461
    const/4 v2, 0x1

    :cond_2
    move v3, v2

    .line 464
    .restart local v3       #ret:I
    goto :goto_0
.end method

.method public isTempShift()Z
    .locals 1

    .prologue
    .line 486
    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->isTempShift:Z

    return v0
.end method

.method obtain(Landroid/view/MotionEvent;II)Landroid/view/MotionEvent;
    .locals 9
    .parameter "me"
    .parameter "action"
    .parameter "pidx"

    .prologue
    .line 546
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getDownTime()J

    move-result-wide v0

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getEventTime()J

    move-result-wide v2

    invoke-virtual {p1, p3}, Landroid/view/MotionEvent;->getX(I)F

    move-result v5

    invoke-virtual {p1, p3}, Landroid/view/MotionEvent;->getY(I)F

    move-result v6

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getMetaState()I

    move-result v7

    move v4, p2

    invoke-static/range {v0 .. v7}, Landroid/view/MotionEvent;->obtain(JJIFFI)Landroid/view/MotionEvent;

    move-result-object v8

    .line 550
    .local v8, ev:Landroid/view/MotionEvent;
    return-object v8
.end method

.method protected onLongPress(Landroid/inputmethodservice/Keyboard$Key;)Z
    .locals 5
    .parameter "key"

    .prologue
    const/4 v4, 0x0

    const/4 v3, 0x1

    const/4 v2, 0x0

    .line 104
    iget-object v0, p1, Landroid/inputmethodservice/Keyboard$Key;->codes:[I

    aget v0, v0, v2

    const/4 v1, -0x2

    if-ne v0, v1, :cond_0

    .line 105
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getOnKeyboardActionListener()Lcom/android/inputmethod/latin/KeyboardView$OnKeyboardActionListener;

    move-result-object v0

    const/16 v1, -0x64

    invoke-interface {v0, v1, v4}, Lcom/android/inputmethod/latin/KeyboardView$OnKeyboardActionListener;->onKey(I[I)V

    move v0, v3

    .line 112
    :goto_0
    return v0

    .line 107
    :cond_0
    iget-object v0, p1, Landroid/inputmethodservice/Keyboard$Key;->codes:[I

    aget v0, v0, v2

    const/16 v1, 0x30

    if-ne v0, v1, :cond_1

    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getKeyboard()Landroid/inputmethodservice/Keyboard;

    move-result-object v0

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mPhoneKeyboard:Landroid/inputmethodservice/Keyboard;

    if-ne v0, v1, :cond_1

    .line 109
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getOnKeyboardActionListener()Lcom/android/inputmethod/latin/KeyboardView$OnKeyboardActionListener;

    move-result-object v0

    const/16 v1, 0x2b

    invoke-interface {v0, v1, v4}, Lcom/android/inputmethod/latin/KeyboardView$OnKeyboardActionListener;->onKey(I[I)V

    move v0, v3

    .line 110
    goto :goto_0

    .line 112
    :cond_1
    invoke-super {p0, p1}, Lcom/android/inputmethod/latin/KeyboardView;->onLongPress(Landroid/inputmethodservice/Keyboard$Key;)Z

    move-result v0

    goto :goto_0
.end method

.method public onShiftTouchDown()V
    .locals 1

    .prologue
    .line 472
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftFreeze:Z

    .line 473
    return-void
.end method

.method public onShiftTouchUp()V
    .locals 1

    .prologue
    .line 480
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftFreeze:Z

    .line 481
    return-void
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 14
    .parameter "me"

    .prologue
    .line 555
    const/4 v10, 0x0

    .line 556
    .local v10, ret:Z
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v11

    and-int/lit16 v9, v11, 0xff

    .line 558
    .local v9, realAction:I
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v11

    const v12, 0xff00

    and-int/2addr v11, v12

    shr-int/lit8 v8, v11, 0x8

    .line 559
    .local v8, pIdx:I
    invoke-virtual {p1, v8}, Landroid/view/MotionEvent;->getPointerId(I)I

    move-result v7

    .line 570
    .local v7, pId:I
    iget-boolean v11, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mEnableMultiTouch:Z

    if-nez v11, :cond_0

    .line 571
    invoke-super {p0, p1}, Lcom/android/inputmethod/latin/KeyboardView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v11

    .line 721
    :goto_0
    return v11

    .line 574
    :cond_0
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getKeyboard()Landroid/inputmethodservice/Keyboard;

    move-result-object v5

    check-cast v5, Lcom/android/inputmethod/latin/LatinKeyboard;

    .line 575
    .local v5, keyboard:Lcom/android/inputmethod/latin/LatinKeyboard;
    const/4 v11, 0x0

    invoke-virtual {v5, v11}, Lcom/android/inputmethod/latin/LatinKeyboard;->setSpaceKeyMoveINFlag(Z)V

    .line 576
    packed-switch v9, :pswitch_data_0

    :cond_1
    :goto_1
    move v11, v10

    .line 721
    goto :goto_0

    .line 579
    :pswitch_0
    invoke-virtual {v5}, Lcom/android/inputmethod/latin/LatinKeyboard;->keyReleased()V

    .line 580
    iput v7, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    .line 581
    const/4 v11, 0x0

    invoke-super {p0, v11}, Lcom/android/inputmethod/latin/KeyboardView;->setPossiblePoly(Z)V

    .line 582
    const/4 v11, 0x1

    invoke-virtual {v5, v11}, Lcom/android/inputmethod/latin/LatinKeyboard;->setSpaceKeyMoveINFlag(Z)V

    .line 583
    invoke-super {p0, p1}, Lcom/android/inputmethod/latin/KeyboardView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v10

    .line 584
    invoke-virtual {p0, p1, v7}, Lcom/android/inputmethod/latin/LatinKeyboardView;->checkShiftForTouchDown(Landroid/view/MotionEvent;I)V

    goto :goto_1

    .line 590
    :pswitch_1
    invoke-virtual {v5}, Lcom/android/inputmethod/latin/LatinKeyboard;->keyReleased()V

    .line 591
    const/4 v11, 0x1

    invoke-super {p0, v11}, Lcom/android/inputmethod/latin/KeyboardView;->setPossiblePoly(Z)V

    .line 592
    iget-boolean v11, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftFreeze:Z

    if-eqz v11, :cond_4

    .line 593
    const/4 v11, 0x1

    iput-boolean v11, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->isTempShift:Z

    .line 597
    :goto_2
    iget v11, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    if-ltz v11, :cond_2

    iget v11, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    iget v12, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftPid:I

    if-eq v11, v12, :cond_2

    .line 601
    iget v11, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    invoke-virtual {p1, v11}, Landroid/view/MotionEvent;->findPointerIndex(I)I

    move-result v3

    .line 602
    .local v3, idx:I
    if-ltz v3, :cond_2

    .line 604
    const/4 v11, 0x1

    invoke-virtual {p0, p1, v11, v3}, Lcom/android/inputmethod/latin/LatinKeyboardView;->obtain(Landroid/view/MotionEvent;II)Landroid/view/MotionEvent;

    move-result-object v1

    .line 605
    .local v1, ev1:Landroid/view/MotionEvent;
    if-eqz v1, :cond_2

    .line 607
    invoke-virtual {p0, v1}, Lcom/android/inputmethod/latin/LatinKeyboardView;->isMTouchUpNeededForKey(Landroid/view/MotionEvent;)Z

    move-result v11

    if-eqz v11, :cond_5

    .line 608
    invoke-super {p0, v1}, Lcom/android/inputmethod/latin/KeyboardView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v10

    .line 620
    .end local v1           #ev1:Landroid/view/MotionEvent;
    .end local v3           #idx:I
    :cond_2
    :goto_3
    if-ltz v8, :cond_3

    .line 622
    invoke-virtual {p1, v8}, Landroid/view/MotionEvent;->findPointerIndex(I)I

    move-result v4

    .line 623
    .local v4, indx:I
    const/4 v11, 0x0

    invoke-virtual {p0, p1, v11, v4}, Lcom/android/inputmethod/latin/LatinKeyboardView;->obtain(Landroid/view/MotionEvent;II)Landroid/view/MotionEvent;

    move-result-object v2

    .line 624
    .local v2, ev2:Landroid/view/MotionEvent;
    if-eqz v2, :cond_3

    .line 625
    const/4 v11, 0x1

    invoke-virtual {v5, v11}, Lcom/android/inputmethod/latin/LatinKeyboard;->setSpaceKeyMoveINFlag(Z)V

    .line 626
    invoke-super {p0, v2}, Lcom/android/inputmethod/latin/KeyboardView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v10

    .line 627
    invoke-virtual {p0, v2, v7}, Lcom/android/inputmethod/latin/LatinKeyboardView;->checkShiftForTouchDown(Landroid/view/MotionEvent;I)V

    .line 628
    iget-boolean v11, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftFreeze:Z

    if-eqz v11, :cond_3

    .line 629
    const/4 v11, 0x1

    iput-boolean v11, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->isTempShift:Z

    .line 634
    .end local v2           #ev2:Landroid/view/MotionEvent;
    .end local v4           #indx:I
    :cond_3
    iput v7, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    goto :goto_1

    .line 595
    :cond_4
    const/4 v11, 0x0

    iput-boolean v11, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->isTempShift:Z

    goto :goto_2

    .line 609
    .restart local v1       #ev1:Landroid/view/MotionEvent;
    .restart local v3       #idx:I
    :cond_5
    invoke-virtual {p0, v1}, Lcom/android/inputmethod/latin/LatinKeyboardView;->isOnShiftKey(Landroid/view/MotionEvent;)Z

    move-result v11

    if-eqz v11, :cond_6

    .line 611
    invoke-virtual {v1}, Landroid/view/MotionEvent;->recycle()V

    goto :goto_3

    .line 613
    :cond_6
    const/4 v11, 0x3

    invoke-virtual {v1, v11}, Landroid/view/MotionEvent;->setAction(I)V

    .line 614
    invoke-super {p0, v1}, Lcom/android/inputmethod/latin/KeyboardView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v10

    goto :goto_3

    .line 639
    .end local v1           #ev1:Landroid/view/MotionEvent;
    .end local v3           #idx:I
    :pswitch_2
    iget v11, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    if-ltz v11, :cond_7

    .line 640
    iget v11, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    invoke-virtual {p1, v11}, Landroid/view/MotionEvent;->findPointerIndex(I)I

    move-result v3

    .line 641
    .restart local v3       #idx:I
    if-ltz v3, :cond_1

    .line 643
    const/4 v11, 0x2

    invoke-virtual {p0, p1, v11, v3}, Lcom/android/inputmethod/latin/LatinKeyboardView;->obtain(Landroid/view/MotionEvent;II)Landroid/view/MotionEvent;

    move-result-object v0

    .line 644
    .local v0, ev:Landroid/view/MotionEvent;
    if-eqz v0, :cond_1

    .line 645
    invoke-super {p0, v0}, Lcom/android/inputmethod/latin/KeyboardView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v10

    goto/16 :goto_1

    .line 649
    .end local v0           #ev:Landroid/view/MotionEvent;
    .end local v3           #idx:I
    :cond_7
    iget v11, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    if-eq v7, v11, :cond_1

    iget v11, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftPid:I

    if-ne v7, v11, :cond_1

    if-ltz v7, :cond_1

    .line 650
    invoke-virtual {p1, v7}, Landroid/view/MotionEvent;->findPointerIndex(I)I

    move-result v3

    .line 651
    .restart local v3       #idx:I
    if-ltz v3, :cond_1

    .line 652
    const/4 v11, 0x2

    invoke-virtual {p0, p1, v11, v3}, Lcom/android/inputmethod/latin/LatinKeyboardView;->obtain(Landroid/view/MotionEvent;II)Landroid/view/MotionEvent;

    move-result-object v0

    .line 653
    .restart local v0       #ev:Landroid/view/MotionEvent;
    if-eqz v0, :cond_1

    .line 654
    invoke-super {p0, v0}, Lcom/android/inputmethod/latin/KeyboardView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v10

    goto/16 :goto_1

    .line 669
    .end local v0           #ev:Landroid/view/MotionEvent;
    .end local v3           #idx:I
    :pswitch_3
    iget v11, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    if-ltz v11, :cond_9

    iget v11, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    if-ne v7, v11, :cond_9

    .line 671
    iget v11, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    invoke-virtual {p1, v11}, Landroid/view/MotionEvent;->findPointerIndex(I)I

    move-result v3

    .line 672
    .restart local v3       #idx:I
    if-ltz v3, :cond_9

    .line 674
    const/4 v11, 0x1

    invoke-virtual {p0, p1, v11, v3}, Lcom/android/inputmethod/latin/LatinKeyboardView;->obtain(Landroid/view/MotionEvent;II)Landroid/view/MotionEvent;

    move-result-object v0

    .line 675
    .restart local v0       #ev:Landroid/view/MotionEvent;
    if-eqz v0, :cond_8

    .line 677
    iget v11, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    iget v12, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftPid:I

    if-ne v11, v12, :cond_a

    .line 678
    iget v11, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    const/4 v12, 0x1

    invoke-virtual {p0, v0, v11, v12}, Lcom/android/inputmethod/latin/LatinKeyboardView;->checkShiftForTouchUp(Landroid/view/MotionEvent;IZ)V

    .line 679
    invoke-super {p0, v0}, Lcom/android/inputmethod/latin/KeyboardView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v10

    .line 680
    const/4 v11, 0x0

    iput-boolean v11, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->isTempShift:Z

    .line 694
    :cond_8
    :goto_4
    const/4 v11, -0x1

    iput v11, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    .line 699
    .end local v0           #ev:Landroid/view/MotionEvent;
    .end local v3           #idx:I
    :cond_9
    iget v11, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    if-eq v7, v11, :cond_1

    iget v11, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftPid:I

    if-ne v7, v11, :cond_1

    if-ltz v7, :cond_1

    .line 700
    invoke-virtual {p1, v7}, Landroid/view/MotionEvent;->findPointerIndex(I)I

    move-result v3

    .line 701
    .restart local v3       #idx:I
    if-ltz v3, :cond_1

    .line 702
    const/4 v11, 0x1

    invoke-virtual {p0, p1, v11, v3}, Lcom/android/inputmethod/latin/LatinKeyboardView;->obtain(Landroid/view/MotionEvent;II)Landroid/view/MotionEvent;

    move-result-object v0

    .line 703
    .restart local v0       #ev:Landroid/view/MotionEvent;
    if-eqz v0, :cond_1

    .line 705
    const/4 v11, 0x1

    invoke-virtual {p0, v0, v7, v11}, Lcom/android/inputmethod/latin/LatinKeyboardView;->checkShiftForTouchUp(Landroid/view/MotionEvent;IZ)V

    .line 706
    invoke-super {p0, v0}, Lcom/android/inputmethod/latin/KeyboardView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v10

    .line 707
    const/4 v11, 0x0

    iput-boolean v11, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->isTempShift:Z

    goto/16 :goto_1

    .line 682
    :cond_a
    invoke-virtual {v5}, Lcom/android/inputmethod/latin/LatinKeyboard;->getLanguageChangeDirection()I

    move-result v6

    .line 683
    .local v6, languageDirection:I
    if-eqz v6, :cond_b

    .line 684
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getOnKeyboardActionListener()Lcom/android/inputmethod/latin/KeyboardView$OnKeyboardActionListener;

    move-result-object v11

    const/4 v12, 0x1

    if-ne v6, v12, :cond_c

    const/16 v12, -0x68

    :goto_5
    const/4 v13, 0x0

    invoke-interface {v11, v12, v13}, Lcom/android/inputmethod/latin/KeyboardView$OnKeyboardActionListener;->onKey(I[I)V

    .line 687
    const/4 v11, 0x3

    invoke-virtual {p0, p1, v11, v3}, Lcom/android/inputmethod/latin/LatinKeyboardView;->obtain(Landroid/view/MotionEvent;II)Landroid/view/MotionEvent;

    move-result-object v0

    .line 688
    invoke-virtual {v5}, Lcom/android/inputmethod/latin/LatinKeyboard;->keyReleased()V

    .line 690
    :cond_b
    invoke-super {p0, v0}, Lcom/android/inputmethod/latin/KeyboardView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v10

    goto :goto_4

    .line 684
    :cond_c
    const/16 v12, -0x69

    goto :goto_5

    .line 716
    .end local v0           #ev:Landroid/view/MotionEvent;
    .end local v3           #idx:I
    .end local v6           #languageDirection:I
    :pswitch_4
    const/4 v11, -0x1

    iput v11, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mDownPid:I

    .line 717
    invoke-super {p0, p1}, Lcom/android/inputmethod/latin/KeyboardView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v10

    goto/16 :goto_1

    .line 576
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_3
        :pswitch_2
        :pswitch_4
        :pswitch_4
        :pswitch_1
        :pswitch_3
    .end packed-switch
.end method

.method public setKeyboard(Landroid/inputmethodservice/Keyboard;)V
    .locals 2
    .parameter "k"

    .prologue
    .line 93
    invoke-super {p0, p1}, Lcom/android/inputmethod/latin/KeyboardView;->setKeyboard(Landroid/inputmethodservice/Keyboard;)V

    .line 95
    invoke-virtual {p1}, Landroid/inputmethodservice/Keyboard;->getMinWidth()I

    move-result v0

    div-int/lit8 v0, v0, 0x7

    iput v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mJumpThresholdSquare:I

    .line 96
    iget v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mJumpThresholdSquare:I

    iget v1, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mJumpThresholdSquare:I

    mul-int/2addr v0, v1

    iput v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mJumpThresholdSquare:I

    .line 98
    invoke-virtual {p1}, Landroid/inputmethodservice/Keyboard;->getHeight()I

    move-result v0

    mul-int/lit8 v0, v0, 0x3

    div-int/lit8 v0, v0, 0x4

    iput v0, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mLastRowY:I

    .line 99
    invoke-direct {p0, p1}, Lcom/android/inputmethod/latin/LatinKeyboardView;->setKeyboardLocal(Landroid/inputmethodservice/Keyboard;)V

    .line 100
    return-void
.end method

.method public setPhoneKeyboard(Landroid/inputmethodservice/Keyboard;)V
    .locals 0
    .parameter "phoneKeyboard"

    .prologue
    .line 88
    iput-object p1, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mPhoneKeyboard:Landroid/inputmethodservice/Keyboard;

    .line 89
    return-void
.end method

.method public setShifted(Z)Z
    .locals 2
    .parameter "shifted"

    .prologue
    .line 534
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->isShifted()Z

    move-result v0

    .line 535
    .local v0, shiftFlag:Z
    iget-boolean v1, p0, Lcom/android/inputmethod/latin/LatinKeyboardView;->mShiftFreeze:Z

    if-eqz v1, :cond_0

    .line 536
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->isShifted()Z

    move-result v0

    .line 541
    :goto_0
    return v0

    .line 538
    :cond_0
    invoke-super {p0, p1}, Lcom/android/inputmethod/latin/KeyboardView;->setShifted(Z)Z

    move-result v0

    goto :goto_0
.end method

.method startPlaying(Ljava/lang/String;)V
    .locals 0
    .parameter "s"

    .prologue
    .line 380
    return-void
.end method
